package com.lagou.rpc.consumer.controller;

import com.lagou.rpc.api.IUserService;
import com.lagou.rpc.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MyController {
    @Autowired
    IUserService userService;

    @GetMapping("getUser")
    User getUser(Integer id){
        User user = userService.getById(id);
        System.out.println(user);
        return user;
    }
}
